<?php

/**
 * author : Tran Minh Toan
 */
class Zend_View_Helper_showTableWarrantydt{
    
    public function showTableWarrantydt($view){
        $arrWarrantydt = $view->arrWarrantydt;
        
        $strHtml = '';
        $strHtml .= '<table class="hovertable">';
        $strHtml .= '<tr>';
        $strHtml .= '<th>Lý do bảo hành</th>';
        $strHtml .= '<th>Ngày trả hàng</th>';
        $strHtml .= '<th>Ghi chú</th>';
        $strHtml .= '<th>Thao tác</th>';
        $strHtml .= '</tr>';
        
        
        if(isset($arrWarrantydt)){
            foreach ($arrWarrantydt as $warrantydt) {
                $strHtml .= '<tr id="tablerow">';
                $strHtml .= '<td>'.$warrantydt->warranty_reason.'</td>';
                $strHtml .= '<td>'.$warrantydt->returnedDate.'</td>';
                $strHtml .= '<td>'.$warrantydt->description.'</td>';
                $strHtml .= '<td><a class="icon-1" href="'.$view->baseUrl().'/admin/warrantydt/edit/id/'.$warrantydt->warrantydt_id.'"/>
                             <a class="icon-2" href="'.$view->baseUrl().'/admin/warrantydt/delete/id/'.$warrantydt->warrantydt_id.'"/></td>';
                $strHtml .= '</tr>';
            }
        }
        /*foreach ($arrWarrantydt as $warrantydt) {
            $strHtml .= 'Reason : '.$warrantydt->warranty_reason;
            $strHtml .= 'ReturnedDate : '.$warrantydt->returnedDate;
            $strHtml .= 'Description'.$warrantydt->description;
        }*/
        $strHtml .= '</table>';
        return $strHtml;
    }
}
?>
